<html>
<body>
<script src="../../resources/js-test.js"></script>
<form action="">
<select required="">
<option>abc</option>
</select>
</form>
<script>
description("This test checks if checkValidity() returns correctly a true result on selecting a valid element.");
jsTestIsAsync = true;
var form = document.querySelector('form');
var select = document.querySelector('select');
form.onchange = function() {
    shouldBeTrue('form.checkValidity()');
    finishJSTest();
};
window.onload = function() {
    select.value = null;
    select.focus();
    if (window.eventSender)
        eventSender.keyDown('a');
};
</script>
</body>
</html>
